home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI SNMP Access to HP-UX MIB 1.1.2
/
SGI SNMP Access to HP-UX MIB 1.1.2.iso
/
dist6.5
/
snmpd.idb
/
etc
/
init.d
/
snmp.z
/
snmp
Wrap
Text File
|
1998-04-29
|
2KB
|
98 lines
#! /bin/sh
#
# This script starts then SNMP agents. SNMP support is made
# up of multiple parts. In the front is the Peer Networks
# master agent which handles new requests in SNMPv1 or v2.
# The master agent talks to an encapsulator which forwards
# requests on to agents. Currently we only ship one agent
# with the base operating system, which supports MIB2 and the
# SGI enterprise MIB. We ship subagents for the HP-UX mib
# and the atm mib as layerred products.
#
# Running chkconfig snmpd off/on controls whether the daemons
# are started.
#
# Configuration files for this are:
# peer_snmp.options command line arguments for master agent
# peer_encaps.options command line arguments for encapsulator
# snmpd.options command line arguments for MIB2/SGI sub-agent
# hpsnmpd.options command line arguments for HP-UX sub-agent
# atmilmid.options command line arguments for ATM sub-agent
#
IS_ON=/sbin/chkconfig
if $IS_ON verbose ; then
ECHO=echo
else
ECHO=:
fi
CONFIG=/etc/config
BINDIR=/usr/etc
case "$1" in
'start')
$ECHO "SNMP Agents:\c"
if $IS_ON snmpd ; then
#
# peer_snmpd is the master agent which deals with SNMP
# protocol conversion.
#
if test -x $BINDIR/peer_snmpd ; then
$BINDIR/peer_snmpd `cat $CONFIG/peer_snmpd.options 2>/dev/null`
$ECHO " peer_snmpd\c"
fi
#
# peer_encaps is an encapsulator to allow the use of SNMPv1
# agents.
#
if test -x $BINDIR/peer_encaps ; then
$BINDIR/peer_encaps `cat $CONFIG/peer_encaps.options 2>/dev/null`
$ECHO " peer_encaps\c"
fi
#
# snmpd - handles MIB2 and the SGI enterprise mib.
#
if test -x $BINDIR/snmpd ; then
$BINDIR/snmpd `cat $CONFIG/snmpd.options 2>/dev/null`
$ECHO " snmpd\c"
fi
#
# hpsnmpd - handles the SGI port of the hp-ux mib.
#
if test -x $BINDIR/hpsnmpd ; then
$BINDIR/hpsnmpd `cat $CONFIG/hpsnmpd.options 2>/dev/null`
$ECHO " hpsnmpd\c"
fi
#
# atmilmid - handles the ATM mib.
#
if test -x $BINDIR/atmilmid ; then
$BINDIR/atmilmid `cat $CONFIG/atmilmid.options 2>/dev/null`
$ECHO " atmilmid\c"
fi
fi
$ECHO "."
;;
'stop')
#
# Kill all of the agents.
#
/sbin/killall -TERM peer_snmpd peer_encaps snmpd hpsnmpd atmilmid
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
exit 0